import 'package:components/lara_press_img.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter/material.dart';

class LaraPressImgExtension extends HtmlExtension {
  @override
  Set<String> get supportedTags => {'img'};

  @override
  InlineSpan build(ExtensionContext context) {
    return WidgetSpan(
      child: LaraPressImgByRatio(
        img: '${context.attributes['src']}',
        width: double.infinity,
      ),
    );
  }
}
